<!DOCTYPE html>
<html>

<head>
    <meta name="viewport"
        content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
    <meta charset="utf-8">
    <link rel="stylesheet" type="text/css" href="css/example.css?v=1.0" />
    <link rel="stylesheet" type="text/css" href="css/weui.min.css?v=1.0" />
    <link rel="stylesheet" type="text/css" href="css/element-ui.css" />
    <link rel="stylesheet" type="text/css" href="css/vant.min.css" />
    <link rel="stylesheet" type="text/css" href="css/public.css?v=5.0" />
    <link rel="stylesheet" type="text/css" href="css/listLook.css?v=7.0.1" />
    <link rel="stylesheet" type="text/css" href="css/addPlace.css" />
    <link rel="stylesheet" type="text/css" href="css/seekList.css?v=1.0.2" />
    <title>关爱老人</title>

</head>

<body>
    <div id="main" style="padding: 10px;" v-cloak>
        <div class="ub-care_title">
            <span>
                <span v-cloak>{{userInfo.realname}}</span>
                <img src="./images/down-JT.png" class="ub-upORdown" :class="{active:isShow}"
                    @click="isShow = !isShow"></img>
            </span>
            <span class="ub-time">#0000-00-00 00:00</span>
        </div>
        <!-- 人员信息 -->
        <div class="ub-care_age" v-show="!isShow">
            <div v-cloak v-if="userInfo.year">
                年龄
                <p>{{userInfo.year}}</p>
            </div>
            <div v-cloak v-if="userInfo.id_card">
                身份证号
                <p>{{userInfo.id_card}}</p>
            </div>
            <div v-cloak v-if="userInfo.category">
                类别
                <p>{{userInfo.category}}</p>
            </div>
            <div v-cloak v-if="userInfo.parent &&  userInfo.parent.name">
                社区
                <p>{{userInfo.parent.name}}</p>
            </div>
            <div v-show="isShowAll">
                <div v-cloak v-if="userInfo.sick_type">
                    具体分类
                    <p>{{userInfo.sick_type}}</p>
                </div>
                <div v-cloak v-if="userInfo.phone">
                    本人或子女联系人电话
                    <p>{{userInfo.phone}}</p>
                </div>
                <div v-cloak v-if="userInfo.birthplace">
                    户籍地址
                    <p>{{userInfo.birthplace}}</p>
                </div>
                <div v-cloak v-if="userInfo.address">
                    居住地址
                    <p>{{userInfo.address}}</p>
                </div>
                <div v-for="(item,index) in userInfo.sick_man_contacts">
                    <div v-cloak v-if="item.realname">
                        紧急联系人{{index + 1}}姓名
                        <p>{{item.realname}}</p>
                    </div>
                    <div v-cloak v-if="item.relationship">
                        紧急联系人{{index + 1}}与老人关系
                        <p>{{item.relationship}}</p>
                    </div>
                    <div v-cloak v-if="item.phone">
                        紧急联系人{{index + 1}}电话
                        <p>{{item.phone}}</p>
                    </div>
                </div>
                <div v-cloak v-if="userInfo.caring_measures">
                    关爱措施
                    <p>{{userInfo.caring_measures}}</p>
                </div>
                <div v-cloak v-if="userInfo.remark">
                    备注
                    <p>{{userInfo.remark}}</p>
                </div>
            </div>
            <div style="display:flex;justify-content: flex-end;color: #409EFF;" v-if="userInfo.sick_type || userInfo.phone || userInfo.birthplace|| userInfo.address||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].realname)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].relationship)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[0].phone)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].realname)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].relationship)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[1].phone)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].realname)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].relationship)||
                  (userInfo.sick_man_contacts && userInfo.sick_man_contacts[2].phone)||
                userInfo.caring_measures || 
                userInfo.remark
               ">
                <span @click="isShowAll = !isShowAll">{{isShowAll?'收起':'更多信息'}}</span>
            </div>
        </div>
        <!-- 走访情况记录 -->
        <div v-cloak class="ub-form">
            <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
                <el-form-item label="关爱情况记录" prop="content">
                    <el-input type="textarea" :rows="5" v-model="ruleForm.content" placeholder="请输入关爱情况记录">
                    </el-input>
                </el-form-item>
            </el-form>
        </div>

        <!-- 到访 -->
        <div v-if="type != 2">
            <div v-cloak class="ub-form">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
                    <el-form-item label="获取当前位置（可手动修改）" prop="address">
                        <div class="ub-location">
                            <img @click="getLocation" src="images/placeLocation.png">
                            <el-input :disabled="ruleForm.address==''" v-model="ruleForm.address"
                                placeholder="点击获取当前定位">
                            </el-input>
                        </div>
                    </el-form-item>
                </el-form>
            </div>
            <div v-cloak class="ub-uploadImg">
                <div class="ub-uploadImg-title">
                    <p>
                        <span style="color:#F56C6C ;" v-if="type !=3">*</span>
                        上传照片</p>
                    <p v-cloak>{{ruleForm.images.length}}/9</p>
                </div>
                <div class="ub-upImage">
                    <div style="position: relative;" v-for="(item, index) in ruleForm.images">
                        <img v-cloak @click="deleteImage(index,1)"
                            style="width: 20px;position: absolute;right: -8px;top: -8px;" src="images/deteleImg.png">
                        <img @click="lookImg(ruleForm.images)" style="width: 90px;height: 90px;object-fit: cover;"
                            :src="item">
                    </div>
                    <i v-show="isUploadLoading" style="font-size: 20px;" class="el-icon-loading"></i>
                    <div v-cloak v-show=" ruleForm.images.length<9 &&!isUpload_Loading" class="ub-uploadImg-btn">
                        <img @click="uploadImageBtn(1)" src="images/addPlaceupImg.png">
                        <!-- <p>拍摄或上传照片</p> -->
                    </div>
                </div>
            </div>
        </div>

        <!-- 电话 -->
        <div v-if="type != 1">
            <div v-cloak class="ub-form" style="margin-top: 0;">
                <el-form :model="ruleForm" :rules="rules" ref="ruleForm" class="demo-ruleForm">
                    <el-form-item>
                        <div style="font-size: 14px;color: #606266;line-height: 40px; padding: 0 12px 0 0;"><span
                                style="color:#F56C6C" v-if="type !=3">*</span>电话探访时间</div>
                        <div @click="dateShow=true"
                            style="background: #F6F7F9;padding: 0 15px;border-radius: 4px;border: 1px solid #DCDFE6; color: #606266;">
                            {{ruleForm._birthplaceQ || "请选择电话探访时间"}}
                        </div>
                    </el-form-item>
                </el-form>
            </div>
            <div v-cloak class="ub-uploadImg">
                <div class="ub-uploadImg-title">
                    <p>
                        <span style="color:#F56C6C ;" v-if="type !=3">*</span>
                        上传通话照片</p>
                    <p v-cloak>{{ruleForm.phoneImages.length}}/9</p>
                </div>
                <div class="ub-upImage">
                    <div style="position: relative;" v-for="(item, index) in ruleForm.phoneImages">
                        <img v-cloak @click="deleteImage(index,2)"
                            style="width: 20px;position: absolute;right: -8px;top: -8px;" src="images/deteleImg.png">
                        <img @click="lookImg(ruleForm.phoneImages)" style="width: 90px;height: 90px;object-fit: cover;"
                            :src="item">
                    </div>
                    <i v-show="isUploadNoteImg" style="font-size: 20px;" class="el-icon-loading"></i>
                    <div v-cloak v-show="ruleForm.phoneImages.length<9&&!isUpload_NoteImg" class="ub-uploadImg-btn">
                        <img @click="uploadImageBtn(2)" src="images/addPlaceupImg.png">
                        <!-- <p>拍摄或上传照片</p> -->
                    </div>
                </div>
            </div>
        </div>

        <!-- 完成按钮 -->
        <div v-cloak class="ub-button">
            <el-button @click="temporary" :loading="loading" type="primary" v-if="type==3">暂 存</el-button>
            <el-button @click="submit" :loading="loading" type="primary">提 交</el-button>
        </div>
        <!-- 提示内容弹窗 -->
        <el-dialog v-cloak center title="提示" :visible.sync="prompt" width="95%">
            <div style="text-align: center;">
                {{msg}}
            </div>
            <span slot="footer" class="dialog-footer">
                <el-button type="primary" @click="goPlaceMan">完 成</el-button>
            </span>
        </el-dialog>

        <!-- 选择场所经纬度弹窗 -->
        <el-dialog v-cloak id="manual" center title="请选择场所位置" :visible.sync="isManual" width="95%">
            <div id="container"></div>
            <div @click="goCurrent()" class="ub-goLocation">
                <img src="images/center.png">
            </div>
            <div v-cloak class="ub-positioning">
                <img src="images/positioning.png" alt="">
            </div>
            <span slot="footer" class="dialog-footer"
                style="display: flex;justify-content: center;position: absolute;left: 0;right: 0;bottom: 15px;">
                <el-button @click="isManual = false">取 消</el-button>
                <el-button type="primary" @click="confirmLocation()">确 定</el-button>
            </span>
        </el-dialog>

        <!-- 电话探访时间 -->
        <van-popup v-model="dateShow" position="bottom" round>
            <van-datetime-picker :value="new Date()" :min-date="new Date(1900,1,1)" show-toolbar type="datetime"
                title="选择电话探访时间" @confirm="dateTimeConfirm" @cancel="dateShow = false" />
        </van-popup>
    </div>
    <script src="js/jquery.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/vue.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jweixin-1.6.0.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/element-ui.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/vant.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="js/jwt-decode.min.js" type="text/javascript" charset="utf-8">
    </script>
    <script src="js/cHttp.js?v=1.0.0" type="text/javascript" charset="utf-8"></script>
    <script src="js/wxPublic.js?v=15.0.0" type="text/javascript" charset="utf-8"></script>
    <!-- <script src="https://cdn.bootcdn.net/ajax/libs/vConsole/3.15.0/vconsole.min.js"></script>
    <script>
        new VConsole()
    </script> -->
    <script src="js/care.js?v=1.0.35" type="text/javascript" charset="utf-8"></script>

</body>


</html>